-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add event handler for creating and deleting markers #505
Conversation
@commy2 Looks perfect. How bad could performance suffer if And what about automatic generated markers like from Blue Force Tracking etc... |
I don't think much.
maybe. although if you make the delay too big, you could miss some obviously. I guess 0.1 is fine?
it would execute for every marker that appears in |
why not using a Statemachine? |
There are no states here. |
I'm not sure about the delay; all CBA event handlers are instantaneous as far as I know, and having these ones behaving differently might be confusing. Also, it might break some potential usages that require low latency. It all comes down to the cost of: private _newAllMapMarkers = allMapMarkers;
if !(_newAllMapMarkers isEqualTo GVAR(oldMarkers)) then { have you measured the performance of that? |
private _newAllMapMarkers = allMapMarkers;
if !(_newAllMapMarkers isEqualTo oldMarkers) then {}; 0 markers: 0.0036 ms 100 markers using So |
This are the theoretical frame decreases of running this every frame with 200 markers (assuming 0.015 x 2 = 0.03 ms): 60.0000 fps ->59.9999 fps All in all completely unnoticeable. |
This reverts commit 4ed8471.
reverted it :) |
When merged this pull request will:
CBA_fnc_addMarkerEventHandler
andCBA_fnc_removeMarkerEventHandler
created
anddeleted
events_this
@bux578 is that what you needed?